<template>
  <div>
    <el-form-item label="污水排水去向">
      <el-select v-model="value.sewageTraceStatus" :disabled="disabled" placeholder="请选择" class="input" @change="handleChange">
        <el-option
          v-for="dict in dict.type.env_waste_water_target"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item v-if="value.sewageTraceStatus === '其他情况'" label="排水去向情况说明">
      <el-input v-model="value.sewageTraceRemark" :disabled="disabled" type="textarea" class="input" placeholder="请输入内容" @change="handleChange" />
    </el-form-item>
    <el-form-item label="排水体制">
      <el-select v-model="value.drainageSystem" :disabled="disabled" placeholder="请选择" class="input" @change="handleChange">
        <el-option
          v-for="dict in dict.type.env_drainage_system"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="污水性质">
      <el-select v-model="value.sewageType" :disabled="disabled" placeholder="请选择" class="input" @change="handleChange">
        <el-option
          v-for="dict in dict.type.env_waste_water_property"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="废水处理设备">
      <el-select v-model="value.sewageEquipStatus" :disabled="disabled" placeholder="请选择" class="input" @change="handleChange">
        <el-option
          v-for="dict in dict.type.env_system_has_or_not"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item v-if="value.sewageEquipStatus === '有'" label="设备名称">
      <el-input v-model="value.sewageEquipRemark" :disabled="disabled" type="textarea" class="input" placeholder="请输入内容" @change="handleChange" />
    </el-form-item>
    <el-form-item label="固废生产情况">
      <el-select v-model="value.sewageSolidStatus" :disabled="disabled" placeholder="请选择" class="input" @change="handleChange">
        <el-option
          v-for="dict in dict.type.env_system_has_or_not"
          :key="dict.value"
          :label="dict.label"
          :value="dict.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item v-if="value.sewageSolidStatus === '有'" label="固废生产情况说明">
      <el-input v-model="value.sewageSolidRemark" :disabled="disabled" type="textarea" class="input" placeholder="请输入内容" @change="handleChange" />
    </el-form-item>
  </div>
</template>
<script>
export default {
  name: 'WasteWater',
  dicts: ['env_waste_water_target', 'env_drainage_system', 'env_waste_water_property', 'env_system_has_or_not'],
  props: {
    disabled: Boolean,
    value: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
    }
  },
  methods: {
    handleChange() {
      this.$emit('input', this.value)
      this.$emit('change', this.value)
    }
  }
}
</script>
